// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addNovel POST /api/novel/add */
export async function addNovelUsingPost(
  body: API.NovelAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/novel/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** delNovel POST /api/novel/del */
export async function delNovelUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.delNovelUsingPOSTParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/novel/del', {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getNovelInfo GET /api/novel/info */
export async function getNovelInfoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNovelInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseNovelInfo_>('/api/novel/info', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** getNovelSimpleInfo GET /api/novel/info-simple */
export async function getNovelSimpleInfoUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getNovelSimpleInfoUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseNovelVO_>('/api/novel/info-simple', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listByUserId GET /api/novel/listByUser */
export async function listByUserIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listByUserIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListNovelVO_>('/api/novel/listByUser', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** PageAllNovel GET /api/novel/page */
export async function pageAllNovelUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.PageAllNovelUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageNovelVO_>('/api/novel/page', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** pageNovelBySearch GET /api/novel/page/search */
export async function pageNovelBySearchUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.pageNovelBySearchUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageNovelVO_>('/api/novel/page/search', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** updateNovel POST /api/novel/update */
export async function updateNovelUsingPost(
  body: API.NovelUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/novel/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
